<style>
	.widgetcontent p{
		margin-left:200px;
	}
	.rq, .error{color: red}
</style>
<ul class="breadcrumbs">
            <li><a href="dashboard.html"><i class="iconfa-home"></i></a> <span class="separator"></span></li>
            <li><a href="table-static.html">User</a> <span class="separator"></span></li>
            <li>Add User</li>
            
            <li class="right">
                <a href="" data-toggle="dropdown" class="dropdown-toggle"><i class="icon-tint"></i> Color Skins</a>
                <ul class="dropdown-menu pull-right skin-color">
                    <li><a href="default">Default</a></li>
                    <li><a href="navyblue">Navy Blue</a></li>
                    <li><a href="palegreen">Pale Green</a></li>
                    <li><a href="red">Red</a></li>
                    <li><a href="green">Green</a></li>
                    <li><a href="brown">Brown</a></li>
                </ul>
            </li>
        </ul>


 <div class="pageheader" >
            <form action="results.html"  method="post" class="searchbar" />
                <input type="text" name="keyword" placeholder="To search type and hit enter..." />
            </form>
            <div class="pageicon"><span class="iconfa-laptop"></span></div>
            <div class="pagetitle">
                   <h5>&nbsp;</h5>
                <h1>Tạo Quảng Cáo</h1>
            </div>
        </div><!--pageheader-->
        
        <div class="maincontent"  >
            <div class="maincontentinner" >
                <div class="row-fluid" >
                        <div style="margin-left:250px" class="span8">
                        <?php foreach($this->view_ads_where as $key) {?>
                            <form enctype="multipart/form-data" method="post"  />
                                
                                <div class="widgetbox personal-information">
                                    <h4 class="widgettitle">Đăng Tin Quảng Cáo</h4>
                                    <div class="widgetcontent">
                                        <p>
                                            <label>Khánh Hàng: </label>
                                            <input type="text" name="customers" value="<?php echo $key['customers'] ?>" class="input-xlarge" placeholder="Nhập họ và tên" /> <span class="rq"> * </span>
                                        </p>
                                        <p>
                                            <label>Mô Tả:</label>
                                             <textarea name="description"  class="span8" placeholder="Mô tả quảng cáo"><?php echo $key['description'] ?></textarea> <span class="rq"> * </span>
                                        </p>
                                        <p>
                                            <label>Ảnh Quảng Cáo:</label>
                                            <input type="file" name="images" class="input-xlarge" value="Pixels" /> <span class="rq"> * </span>
                                        </p>
                                        <p>
                                            <label>Đường Dẫn:</label>
                                             <textarea name="url" class="span8" placeholder="URL quảng cáo"><?php echo $key['url'] ?></textarea> <span class="rq"> * </span>
                                        
                                        </p>
                                        <p>
                                            <label>Thời Gian Đăng /Tháng</label>
                                            <input type="text" name="time" value="<?php echo $key['time_lock'] ?>" class="input-xlarge" placeholder="Số Tháng" /> <span class="rq"> * </span>
                                        </p>
                                        <p>
                                            <label>Vị Trí Đăng:</label>
                                            <select name ="location">
												<?php foreach($this->location as $location) { ?>
                                                	<?php if($location['id'] == $key['location']) {?>
														<option selected="selected"  value="<?php echo $location['id'] ?>"> <?php echo $location['name'] ?> </option>
													<?php } ?>
                                            	<option   value="<?php echo $location['id'] ?>"> <?php echo $location['name'] ?> </option>
												<?php } ?>
                                           	</select>
                                        </p>
                                        <p>
                                            <label>Kiểm Tra:</label>
                                            <?php if($key['is_delete']==0){?>
                                            Mở   	<input type="radio" checked="checked" value="0" class="span8"  name="delete"/>
                                            Khóa	<input type="radio" value="1" class="span8" name="delete" />
                                        	<?php }else{ ?>
                                            Mở   	<input type="radio"  value="0" class="span8"  name="delete"/>
                                            Khóa	<input type="radio" checked="checked" value="1" class="span8" name="delete" />
                                       		<?php }?>
                                       </p>
                                        
                                    </div>
                                </div>
											
                                
                                <p style="margin-left:210px">
                                	<button type="submit" class="btn btn-primary">Cập Nhật Quảng Cáo</button> <button type="submit" class="btn btn-primary">Làm Mới</button>
                                </p>
                                
                            </form>
                         <?php }?>
                        </div><!--span8-->
                    </div><!--row-fluid-->